/**
    Name: IntelliJ IDEA darcula theme
    From IntelliJ IDEA by JetBrains
 */

 .cm-s-darcula  { font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif;}
 .cm-s-darcula.CodeMirror { background: #2B2B2B; color: #A9B7C6; }

 .cm-s-darcula span.cm-meta { color: #BBB529; }
 .cm-s-darcula span.cm-number { color: #6897BB; }
 .cm-s-darcula span.cm-keyword { color: #CC7832; line-height: 1em; font-weight: bold; }
 .cm-s-darcula span.cm-def { color: #A9B7C6; font-style: italic; }
 .cm-s-darcula span.cm-variable { color: #A9B7C6; }
 .cm-s-darcula span.cm-variable-2 { color: #A9B7C6; }
 .cm-s-darcula span.cm-variable-3 { color: #9876AA; }
 .cm-s-darcula span.cm-type { color: #AABBCC; font-weight: bold; }
 .cm-s-darcula span.cm-property { color: #FFC66D; }
 .cm-s-darcula span.cm-operator { color: #A9B7C6; }
 .cm-s-darcula span.cm-string { color: #6A8759; }
 .cm-s-darcula span.cm-string-2 { color: #6A8759; }
 .cm-s-darcula span.cm-comment { color: #61A151; font-style: italic; }
 .cm-s-darcula span.cm-link { color: #CC7832; }
 .cm-s-darcula span.cm-atom { color: #CC7832; }
 .cm-s-darcula span.cm-error { color: #BC3F3C; }
 .cm-s-darcula span.cm-tag { color: #629755; font-weight: bold; font-style: italic; text-decoration: underline; }
 .cm-s-darcula span.cm-attribute { color: #6897bb; }
 .cm-s-darcula span.cm-qualifier { color: #6A8759; }
 .cm-s-darcula span.cm-bracket { color: #A9B7C6; }
 .cm-s-darcula span.cm-builtin { color: #FF9E59; }
 .cm-s-darcula span.cm-special { color: #FF9E59; }

 .cm-s-darcula .CodeMirror-cursor { border-left: 1px solid #A9B7C6; }
 .cm-s-darcula .CodeMirror-activeline-background { background: #323232; }
 .cm-s-darcula .CodeMirror-gutters { background: #313335; border-right: 1px solid #313335; }
 .cm-s-darcula .CodeMirror-guttermarker { color: #FFEE80; }
 .cm-s-darcula .CodeMirror-guttermarker-subtle { color: #D0D0D0; }
 .cm-s-darcula .CodeMirrir-linenumber { color: #606366; }
 .cm-s-darcula .CodeMirror-matchingbracket { background-color: #3B514D; color: #FFEF28 !important; font-weight: bold; }

 .cm-s-darcula div.CodeMirror-selected { background: #214283; }
  .CodeMirror-hints.darcula {
   font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;
   color: #9C9E9E;
   background-color: #3B3E3F !important;
 }

 .CodeMirror-hints.darcula .CodeMirror-hint-active {
   background-color: #494D4E !important;
   color: #9C9E9E !important;
 }
/* ----------- darcula ------------*/

/* ----------- summerfruit ------------*/
 .cm-s-summerfruit {
    /* font-size: 1em; */
    font-size: 14px;
    line-height: 1.5em;
    font-family: 'Source Code Pro', Menlo, Consolas, Monaco, monospace;
	/* font-family: inconsolata, monospace; */
	letter-spacing: 0.3px;
	word-spacing: 1px;
	background: #fdfdfd;
	color: #181818;
}
.cm-s-summerfruit .CodeMirror-lines {
	padding: 8px 0;
}
.cm-s-summerfruit .CodeMirror-gutters {
	box-shadow: 1px 0 2px 0 rgba(0, 0, 0, 0.5);
	-webkit-box-shadow: 1px 0 2px 0 rgba(0, 0, 0, 0.5);
	background-color: #fdfdfd;
	padding-right: 10px;
	z-index: 3;
	border: none;
}
.cm-s-summerfruit div.CodeMirror-cursor {
	border-left: 3px solid #181818;
}
.cm-s-summerfruit .CodeMirror-activeline-background {
	background: #FFFFFF0D;
}
.cm-s-summerfruit .CodeMirror-selected {
	background: #b7dce8;
}
.cm-s-summerfruit .cm-comment {
    /* color: #22a21f; */
    color: #6a9955;
	/* background: #eee; */
}
.cm-s-summerfruit .cm-keyword {
	color: #fb6620;
}
.cm-s-summerfruit .cm-string {
	color: #1586d2;
}
/* .cm-s-summerfruit .cm-variable-2 {
	color: #F92672;
} */
.cm-s-summerfruit .cm-property {
	color: null;
}
.cm-s-summerfruit .cm-atom {
	color: null;
}
.cm-s-summerfruit .cm-number {
	color: null;
}
.cm-s-summerfruit .cm-operator {
	color: #fb6620;
}
.cm-s-summerfruit .CodeMirror-linenumber {
	color: #22a21f;
}
/* ----------- summerfruit ------------*/

.CodeMirror {
    height: 100%;
    width: 100%;
}

.CodeMirror-empty.CodeMirror-focused {
    outline: none;
}
.CodeMirror pre.CodeMirror-placeholder {
    color: #999;
}

.CodeMirror-lines {
    padding: 0;
}

/* linter 类问题样式 */
.CodeMirror-linewidget {
    padding: 0px;
    .lint-hints {
        font-family: arial;
        position: relative;
        background: rgba(235, 210, 209, 0.4);
        padding: 2px 0 2px 18px;
        font-size: 14px;
        line-height: 1.4;
        color: #dd4423;
        cursor: pointer;

        &.linter {
            background: #fff;
            border-bottom: 3px solid #feecec;
            &.active {
                background: #fff8f8;
            }
        }

        .lint-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .handle-head {
            display: flex;
            font-size: 16px;
            color: #AFAFAF;
            min-width: 105px;
            position: relative;
            top: 5px;
        }

        .btn {
            position: relative;
            margin-left: 12px;
            padding: 3px 5px;
            height: 20px;
            width: 20px;
            color: #AFAFAF;
            span {
                position: absolute;
                top: 28px;
                right: -10px;
                background: #fff;
                padding: 6px;
                font-size: 12px;
                white-space: nowrap;
                border-radius: 4px;
                color: #26323d;
                box-shadow: 0 0 20px 4px rgba(154, 161, 177, .15), 0 4px 80px -8px rgba(36, 40, 47, .25), 0 4px 4px -2px rgba(91, 94, 105, .15);
                background-color: #fff;
                opacity: 0;
                visibility: hidden;
                transition: all 0.2s linear;
            }
            &:hover {
                opacity: 0.8;
                span {
                    visibility: visible;
                    opacity: 1;
                }
            }
        }

        p {
            line-height: 1.8;
        }

        .lint-icon {
            position: absolute;
            color: #dd4423;
            left: 2px;
            top: 6px;
            transition: transform .3s cubic-bezier(.4, 0, .2, 1)
        }

        .checker-detail {
            display: none;
            color: #777;
            font-size: 14px;
            padding: 1em 0;
        }

        .icon-edit2 {
            color: #777;
            position: absolute;
            top: -2px;
            right: -5px;
        }

        .checker-comment {
            margin-right: 10px;
            margin-bottom: 10px;
            padding: 6px 8px;
            border: 1px solid #fcc8be;
            border-radius: 4px;
            background-color: #fde7e7;
            cursor: default;
        }

        .comment-item {
            display: flex;
            justify-content: space-between;
            align-items: baseline;
            color: #63656E;
            font-size: 12px;
            .info {
                padding-right: 10px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }
            .handle {
                white-space: nowrap;
            }
            .icon-delete {
                color: #da7f79;
                font-weight: bold;
                cursor: pointer;
            }
        }

        &.active {
            .checker-detail {
                display: block;
            }
            .lint-icon {
                transform: rotate(90deg);
            }
        }
    }
}

.lint-hints-wrap {
    /* border-top: 1px solid rgba(202, 115, 115, 0.5); */
    /* border-bottom: 1px solid rgba(202, 115, 115, 0.5); */

    .CodeMirror-line {
        background: rgba(255, 77, 91, 0.25);
        /* border-top: 1px solid rgba(255, 255, 255, 0.1); */
        
    }

    
    &.main {
        .CodeMirror-line {
            background: rgba(237, 142, 140, 0.5);
        }
    }
    &.linter {
        margin: 24px 0;
        :first-of-type {
            margin: 0;
        }
        .CodeMirror-line {
            background: #fae2e1;
        }
        /* border-top: 1px solid #ca7373!important; */
        /* border-bottom: 1px solid #ca7373!important; */

        &.active .CodeMirror-line {
            background: #ffc5ba;
        }
    }
    &.ccn {
        .CodeMirror-line {
            background: rgba(255, 113, 107, 0.2);
        }
    }
    &.defect-trace {
        .CodeMirror-line {
            background: rgba(250, 241, 194, 0.8);
        }
    }

    &+.lint-hints-wrap {
        border-top: none;
    }
    &.lint-hints-wrap.prev {
        border-bottom: none;
    }
    &.linter {
        background: #fff;
        border: 2px solid #fcc8be;
        &.active {
            border: 2px solid #e85939;
        }
    }
    .tag-line {
        line-height: 38px;
        color: #63656E;
        .tag {
            /* background: #fef5f5; */
            font-size: 12px;
            padding: 2px 10px;
            margin-right: 5px;
            border-radius: 2px;
            position: relative;
            .icon-exclamation-circle-shape {
                position: relative;
                font-size: 14px;
                /* top: 2px; */
                opacity: 0.8;
                &.type-1 { color: #ff5656; }
                &.type-2 { color:#ff9c01; }
                &.type-3,
                &.type-4 {
                    color: #54cad1;
                }
            }
            .codecc-icon {
                color: #c8c8c8;
                display: inline-block;
                padding: 0 3px;
            }
        }
    }
}

/* 重复率代码展示样式 */

.CodeMirror-dupclines {
    margin: 0 1px;
    width: 5px;
}

.dupc-dotline {
    /* height: 22px!important; */
    width: 3px;
    background-color: #ffc1c1;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 1px;

    &.hover {
        width: 5px;
        left: 0;
    }
    &.selected {
        background-color: #ff7575;
    }
}
#codeSource .background .CodeMirror-line {
    background: #FAEAE9;
}
#codeTarget .background .CodeMirror-line {
    background: #dff6ff;
}